package com.example.demo;

public class BuilderDemo {

}

    public static class Test{
        public String a;
        public static TestBuilder builder(){
            return new TestBuilder();
        }

        public static class TestBuilder{
            private String a;

            public TestBuilder a(String a){
                this.a= a ;
                return this;
            }

            public Test build(){
                Test test=new Test();
                test.a=this.a;
                return test;
            }
        }
    }